source 'https://github.com/CocoaPods/Specs.git'

# ignore all warnings from all pods
inhibit_all_warnings!

use_frameworks!
platform :watchos, '5.0'

# workaround for https://github.com/CocoaPods/CocoaPods/issues/8073
# need for correct invalidate of cache MultiPlatformLibrary.framework
install! 'cocoapods', :disable_input_output_paths => true

pre_install do |installer|
  # We represent a Kotlin/Native module to CocoaPods as a vendored framework.
  # CocoaPods needs access to such frameworks during installation process to obtain
  # their type (static or dynamic) and configure the Xcode project accordingly.
  # Build MultiPlatformLibrary framework to correct install Pod
  puts "prepare MultiPlatformLibrary.framework (require some time...)"
  `cd .. && ./gradlew :watchos-app:syncMultiPlatformLibraryDebugFrameworkWatchosArm32`
  puts "preparing MultiPlatformLibrary.framework complete"
end

target 'watchExtension' do
  pod 'MultiPlatformLibrary', :path => '../watchos-app'
#  pod 'MultiPlatformLibraryMvvm', :git => 'https://github.com/icerockdev/moko-mvvm.git', :tag => 'release/0.3.0'
#  pod 'MultiPlatformLibraryResources', :git => 'https://github.com/icerockdev/moko-resources.git', :tag => 'release/0.3.0'
#  pod 'MultiPlatformLibraryUnits/Core', :git => 'https://github.com/icerockdev/moko-units.git', :tag => 'release/0.1.0'
end
